package com.github.kassadin.kotlinandroid

import android.content.Context
import android.widget.Toast

/**
 *
 * Created by <b>kassadin@foxmail.com</b> on 16/1/22 15:29
 */


fun Context.toast(message: String, length: Int = Toast.LENGTH_SHORT) {
    Toast.makeText(this, message, length).show()
}

fun Context.longToast(message: String) {
    toast(message, Toast.LENGTH_LONG)
}

fun Context.niceToast(message: String, tag: String = MainActivity::class.simpleName!!, length: Int = Toast.LENGTH_SHORT) {
    Toast.makeText(this, "[$tag] $message", length).show()
}